package com.entity;

// Generated 09.02.2014 20:16:29 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * CommentsEntity generated by hbm2java
 */
@Entity
@Table(name = "comments", catalog = "jiraexcel", uniqueConstraints = @UniqueConstraint(columnNames = "id"))
public class CommentsEntity implements java.io.Serializable {

	private Integer idComments;
	private CommentEntity commentEntity;
	private UserEntity userEntityByIdAuthor;
	private UserEntity userEntityByIdUpdateAuthor;
	private String self;
	private String id;
	private String body;
	private Date created;
	private Date updated;

	public CommentsEntity() {
	}

	public CommentsEntity(CommentEntity commentEntity,
			UserEntity userEntityByIdAuthor,
			UserEntity userEntityByIdUpdateAuthor) {
		this.commentEntity = commentEntity;
		this.userEntityByIdAuthor = userEntityByIdAuthor;
		this.userEntityByIdUpdateAuthor = userEntityByIdUpdateAuthor;
	}

	public CommentsEntity(CommentEntity commentEntity,
			UserEntity userEntityByIdAuthor,
			UserEntity userEntityByIdUpdateAuthor, String self, String id,
			String body, Date created, Date updated) {
		this.commentEntity = commentEntity;
		this.userEntityByIdAuthor = userEntityByIdAuthor;
		this.userEntityByIdUpdateAuthor = userEntityByIdUpdateAuthor;
		this.self = self;
		this.id = id;
		this.body = body;
		this.created = created;
		this.updated = updated;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id_comments", unique = true, nullable = false)
	public Integer getIdComments() {
		return this.idComments;
	}

	public void setIdComments(Integer idComments) {
		this.idComments = idComments;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_comment", nullable = false)
	public CommentEntity getCommentEntity() {
		return this.commentEntity;
	}

	public void setCommentEntity(CommentEntity commentEntity) {
		this.commentEntity = commentEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_author", nullable = false)
	public UserEntity getUserEntityByIdAuthor() {
		return this.userEntityByIdAuthor;
	}

	public void setUserEntityByIdAuthor(UserEntity userEntityByIdAuthor) {
		this.userEntityByIdAuthor = userEntityByIdAuthor;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_updateAuthor", nullable = false)
	public UserEntity getUserEntityByIdUpdateAuthor() {
		return this.userEntityByIdUpdateAuthor;
	}

	public void setUserEntityByIdUpdateAuthor(
			UserEntity userEntityByIdUpdateAuthor) {
		this.userEntityByIdUpdateAuthor = userEntityByIdUpdateAuthor;
	}

	@Column(name = "self", length = 1000)
	public String getSelf() {
		return this.self;
	}

	public void setSelf(String self) {
		this.self = self;
	}

	@Column(name = "id", unique = true, length = 100)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "body", length = 1000)
	public String getBody() {
		return this.body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created", length = 19)
	public Date getCreated() {
		return this.created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated", length = 19)
	public Date getUpdated() {
		return this.updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

}
